package com.example.springboot.config.postProcessor.apply.first;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/10/8 9:47
 */
public class AopProxyImpl implements Sourceable {
    private Sourceable sourceable;

    public AopProxyImpl(Sourceable sourceable) {
        super();
        this.sourceable = sourceable;
    }

    @Override
    public void method() {
        before();
        sourceable.method();
        after();
    }

    private void after() {
        System.out.println("after proxy!");
    }

    private void before() {
        System.out.println("before proxy!");
    }

}
